<script lang="ts" setup>
const emit = defineEmits<{
  (e: 'delete'): void;
}>();
</script>
<template>
  <el-popconfirm
    title="确认删除该条数据？"
    @confirm="emit('delete')"
    confirm-button-type="danger"
    :hide-icon="true"
    :hide-after="0"
    :width="200"
    v-bind="$attrs"
  >
    <template #reference>
      <slot name="reference">
        <el-button link type="danger" size="small"> 删除 </el-button>
      </slot>
    </template>
  </el-popconfirm>
</template>
<style lang="scss" scoped></style>
